/*  1:   */ package org.jetbrains.jps.model.library.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.JpsCompositeElement;
import org.jetbrains.jps.model.JpsElement;
import org.jetbrains.jps.model.JpsElementCollection;
import org.jetbrains.jps.model.JpsElementReference;
import org.jetbrains.jps.model.impl.JpsNamedElementReferenceBase;
import org.jetbrains.jps.model.library.JpsLibrary;
import org.jetbrains.jps.model.library.JpsTypedLibrary;
import org.jetbrains.jps.model.library.sdk.JpsSdk;
import org.jetbrains.jps.model.library.sdk.JpsSdkReference;
import org.jetbrains.jps.model.library.sdk.JpsSdkType;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */
/* 14:   */
/* 15:   */
/* 16:   */ 
/* 17:   */ public class JpsSdkReferenceImpl<P extends JpsElement>
/* 18:   */   extends JpsNamedElementReferenceBase<JpsLibrary, JpsTypedLibrary<JpsSdk<P>>, JpsSdkReferenceImpl<P>>
/* 19:   */   implements JpsSdkReference<P>
/* 20:   */ {
/* 21:   */   private final JpsSdkType<P> b;
/* 22:   */   
/* 23:   */   public JpsSdkReferenceImpl(@NotNull String paramString, @NotNull JpsSdkType<P> paramJpsSdkType, @NotNull JpsElementReference<? extends JpsCompositeElement> paramJpsElementReference)
/* 24:   */   {
/* 25:39 */     super(paramString, paramJpsElementReference);
/* 26:40 */     this.b = paramJpsSdkType;
/* 27:   */   }
/* 28:   */   
/* 29:   */   private JpsSdkReferenceImpl(JpsSdkReferenceImpl<P> paramJpsSdkReferenceImpl)
/* 30:   */   {
/* 31:44 */     super(paramJpsSdkReferenceImpl);
/* 32:45 */     this.b = paramJpsSdkReferenceImpl.b;
/* 33:   */   }
/* 34:   */   
/* 35:   */   @NotNull
/* 36:   */   public String getSdkName()
/* 37:   */   {
/* 38:50 */     String tmp4_1 = this.myElementName;
/* 39:50 */     if (tmp4_1 == null) {
/* 40:50 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/library/impl/JpsSdkReferenceImpl", "getSdkName" }));
/* 41:   */     }
/* 42:50 */     return tmp4_1;
/* 43:   */   }
/* 44:   */   
/* 45:   */   protected JpsTypedLibrary<JpsSdk<P>> resolve(JpsLibrary paramJpsLibrary)
/* 46:   */   {
/* 47:55 */     return paramJpsLibrary.asTyped(this.b);
/* 48:   */   }
/* 49:   */   
/* 50:   */   @NotNull
/* 51:   */   public JpsSdkReferenceImpl<P> createCopy()
/* 52:   */   {
/* 53:61 */     void tmp8_5 = new JpsSdkReferenceImpl(this);
/* 54:61 */     if (tmp8_5 == null) {
/* 55:61 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/library/impl/JpsSdkReferenceImpl", "createCopy" }));
/* 56:   */     }
/* 57:61 */     return tmp8_5;
/* 58:   */   }
/* 59:   */   
/* 60:   */   @Nullable
/* 61:   */   protected JpsElementCollection<? extends JpsLibrary> getCollection(@NotNull JpsCompositeElement paramJpsCompositeElement)
/* 62:   */   {
/* 63:66 */     if (paramJpsCompositeElement == null) {
/* 64:66 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/library/impl/JpsSdkReferenceImpl", "getCollection" }));
/* 65:   */     }
/* 66:66 */     return (JpsElementCollection)paramJpsCompositeElement.getContainer().getChild(JpsLibraryRole.LIBRARIES_COLLECTION_ROLE);
/* 67:   */   }
/* 68:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.library.impl.JpsSdkReferenceImpl

 * JD-Core Version:    0.7.0.1

 */